package com.agstar.demo.blockqueue;

import java.util.concurrent.LinkedBlockingQueue;

/**
 * @author agstar
 * @date 2020/5/16 17:22
 */
public class LinkedBlockQueue {
    public static void main(String[] args) throws InterruptedException {
        LinkedBlockingQueue<String> linkedBlockingQueue = new LinkedBlockingQueue<>(1);
        linkedBlockingQueue.add("");
        linkedBlockingQueue.remove();


        linkedBlockingQueue.offer("");
        linkedBlockingQueue.poll();

        linkedBlockingQueue.put("");
        linkedBlockingQueue.take();

    }
}
